 <?php
 $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
 $domain = $_SERVER['HTTP_HOST'];
 $current_url = $protocol . $domain;
 $to = "$current_url/admin";
     $cookie = $_COOKIE["login"];
    if($cookie != "true") {
        header("Location:$to");
        exit();
		    }
?>

<?php
echo '
<!doctype html>
<html> 
    <head> 
        <title>卷密WindCloud-试卷管理</title> 
        <link rel="stylesheet" type="text/css" href="style.css"> 
    </head> 
    <body> 
        <header> 
            <h1>试卷管理页面</h1> 
        </header> 
        <main>
    <form action="./upload.php" method="post" enctype="multipart/form-data">
        <input type="file" name="fileToUpload" id="fileToUpload"><br>
        <input type="submit" value="上传文件" name="submit">
    </form>
             </from>
        <footer> 
            <p>版权所有 © 2023</p> 
        </footer>  
    </body>
</html>';
?>





